import React, { PureComponent } from "react";
// import PropTypes from "prop-types";
import style from "./style.less";

class TabPane extends PureComponent {
  render() {
    console.log(this.props);
    return (
      <div>
        <div>{this.props.children}</div>
      </div>
    );
  }
}

class Tabs extends PureComponent {
  static TabPane = TabPane;
  state = {
    defaultActiveKey: this.props.defaultActiveKey
  };

  componentDidMount() {
    // console.log(this.props);
  }

  render() {
      let {
          children,
      }  = this.props
      let TabPane = []
      children.forEach((ement) => {
        console.log(ement)
        TabPane.push(ement.props.tab)
      })
      console.log(TabPane)
    return (
      <div className={style.TabsWrap}>
        {this.props.children}
      </div>
    );
  }
}

export default Tabs;
